/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.compiere.apps.form;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Properties;

import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JLayeredPane;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JRadioButton;
import javax.swing.JRootPane;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.JViewport;
import javax.swing.border.Border;
import javax.swing.table.AbstractTableModel;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeModel;

import org.compiere.model.MUser;
import org.compiere.model.Mzinvoice;
import org.compiere.model.Mzuser;

/**
 *
 * @author alm
 */
public class zinvoice extends javax.swing.JFrame {

    /**
     * Creates new form NewJFrame
     */
	Properties ctx;
	int invoice = 0;
	Mzuser user = null;
	Mzuser bp = null;
	
	Color color = new java.awt.Color(153,230,245);
    Border borderBlue = javax.swing.BorderFactory.createEtchedBorder(null, java.awt.Color.blue);
    Border borderRed = javax.swing.BorderFactory.createEtchedBorder(null, java.awt.Color.red);
    Border borderDefault = javax.swing.BorderFactory.createEtchedBorder();
    String state = "";
    
	
    public zinvoice(Properties ctx, int invoice, Mzuser user, String view) {
    	this.ctx = ctx;
    	this.invoice = invoice;
    	this.user = user;
    	this.state = view;
//    	time
    	
        initComponents();
        
        // make the frame half the height and width
        Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
        int x = (int) ((dimension.getWidth() - this.getWidth()) / 2);
        int y = (int) ((dimension.getHeight() - this.getHeight()) / 2);
        this.setLocation(x, y);
        
        initJtable();
//        System.out.println(user.getName());
        if(invoice == 0){
	        jtfFixSupplier.setText(user.getName().trim());
	        jtfFixSupplierIin.setText(user.getiin().trim());
	        jtfFixSupplierAddress.setText(user.getadress() == null ? "" : user.getadress().trim());
	        jtfFixSupplierSerial.setText(user.getserial() == null ? "" : user.getserial().trim());
	        jtfFixSupplierSerialNo.setText(user.getnSerial() == null ? "" : user.getnSerial().trim());
        }
//        user.getadress()
    	        
        if(invoice > 0){
        	
        	String pattern = "dd.MM.yyyy";
        	SimpleDateFormat format = new SimpleDateFormat(pattern);
        	Mzinvoice zi = null;

        	zi = new Mzinvoice(ctx, invoice, null);
        	

        	//if POSTED || CLOSED then view only
        	if(zi.getStatus().equals("AP") || zi.getStatus().equals("CL")){
                JRootPane root =  (JRootPane) this.getComponent(0);
                JLayeredPane layer = (JLayeredPane) root.getComponent(1);
                JPanel panel = (JPanel) layer.getComponent(0);
                JScrollPane scroll = (JScrollPane) panel.getComponent(0);
                JViewport port = (JViewport) scroll.getComponent(0);
                panel = (JPanel) port.getComponent(0);
                layer = (JLayeredPane) panel.getComponent(0);
                int i = layer.getComponentCount();

                for(int j=0; j < i; j++){
                    Component c = layer.getComponent(j);

                    if(c instanceof JTextField || c instanceof JCheckBox || c instanceof JRadioButton || c instanceof JButton || c instanceof JComboBox )
                        c.setEnabled(false);
                }
                
                jbSave.setText("Подтвердить");
                
                if(zi.getStatus().equals("AP") && zi.getzuser_ID() == user.get_ID()){
            		jbKey.setEnabled(false);
            		jTextField63.setEditable(false);
            		
            		jbKey2.setEnabled(false);
            		jTextField64.setEditable(false);
            		
            		jbSave.setEnabled(false);
            		jbCancel.setEnabled(false);
                }
        	}
        	else if(zi.getStatus().equals("") || zi.getStatus().equals("CA")){
        		jbSave.setText("Отправить");
        		jbKey.setEnabled(true);
        		jTextField63.setEditable(true);
        		jTextField63.setText("");
        		jTextField63.setBorder(borderBlue);
        		
        		jbKey2.setEnabled(false);
        		jTextField64.setEditable(false);
        		jTextField64.setText("");
        		jTextField64.setBorder(borderDefault);
        	}
        	else if(zi.getStatus().equals("SD")){
       		
                JRootPane root =  (JRootPane) this.getComponent(0);
                JLayeredPane layer = (JLayeredPane) root.getComponent(1);
                JPanel panel = (JPanel) layer.getComponent(0);
                JScrollPane scroll = (JScrollPane) panel.getComponent(0);
                JViewport port = (JViewport) scroll.getComponent(0);
                panel = (JPanel) port.getComponent(0);
                layer = (JLayeredPane) panel.getComponent(0);
                int i = layer.getComponentCount();

                for(int j=0; j < i; j++){
                    Component c = layer.getComponent(j);

                    if(c instanceof JTextField || c instanceof JCheckBox || c instanceof JRadioButton || c instanceof JButton || c instanceof JComboBox )
                        c.setEnabled(false);
                }

                if(zi.getzuser_ID() != user.get_ID()){
	        		jbSave.setText("Принять");
	        		jbSave.setEnabled(true);
	        		jbCancel.setEnabled(true);
	        		jbKey2.setEnabled(true);
	        		jbKey2.setBorder(borderBlue);
	        		jTextField64.setEditable(false);
//	        		jbKey.setBorder(borderBlue);
                }


        	}        	
        		
        		
        		
        	// zi.setdocno(Integer.parseInt(jtfDocNo.getText()));
        	jtfDocNo.setText(Integer.valueOf(zi.getdocno()).toString());

        	//dateacct
        	if(zi.getDateAcct() != null){
        		Date d = zi.getDateAcct();
        		
	        	jtfDay.setText(d.toString().substring(8, 10));
	        	jcbMonths.setSelectedIndex(d.getMonth());
	        	jtfYear.setText(Integer.valueOf(d.getYear() + 1900).toString());
        	}
        	
        	//doctype
        	if(zi.isdoctype())
        		jcbFix.setSelected(true); //)	zi.setdoctype(true);
        	else 
        		jcbFix.setSelected(false);
        	
        	//fixDateAcct
        	if(zi.getfixdateacct() != null){
        		String d = format.format(zi.getfixdateacct());
        		jtfFixDateAcct.setText(d);
        	}

//        	//fixno
        	//zi.setfixno(Integer.parseInt(jtfFixNo.getText()));
	        jtfFixNo.setText(Integer.valueOf(zi.getfixno()).toString());
        	
        	//fixdocno
//        	zi.setfixdocno(Integer.parseInt(jtfFixDocNo.getText()));
        	jtfFixDocNo.setText(Integer.valueOf(zi.getfixdocno()).toString());
        	
        	//fixdocdateacct
        	if(zi.getfixdocdateacct() != null){
        		String g = format.format(zi.getfixdocdateacct());
        		jtfFixDocDateAcct.setText(g);
        	}
        		
        	//fixsupplier
    		jtfFixSupplier.setText(zi.getfixsupplier().trim());
        	
        	//fixsupplierstatus
    		if(zi.getfixsupplierstatus().compareTo(new BigDecimal(1)) == 0)
    			jrbSupplier1.setSelected(true); 
    		else if (zi.getfixsupplierstatus().compareTo(new BigDecimal(2)) == 0)
				jrbSupplier2.setSelected(true);
    		else if (zi.getfixsupplierstatus().compareTo(new BigDecimal(3)) == 0)
				jrbSupplier3.setSelected(true);
    		else if (zi.getfixsupplierstatus().compareTo(new BigDecimal(4)) == 0)
				jrbSupplier4.setSelected(true);
    		else if (zi.getfixsupplierstatus().compareTo(new BigDecimal(5)) == 0)
				jrbSupplier5.setSelected(true);

        	
        	//zi.setfixsupplierstatus()
    		jtfFixSupplierIin.setText(zi.getfixsupplieriin());
        	
        	//setfixsupplieraddress
    		jtfFixSupplierAddress.setText(zi.getfixsupplieraddress());
        	
        	//setfixsupplierserial
    		jtfFixSupplierSerial.setText(zi.getfixsupplierserial());
        	
        	//setfixsuppliererialno
    		jtfFixSupplierSerialNo.setText(Integer.valueOf(zi.getfixsuppliererialno()).toString());
        	
        	//setfixconract
    		jtfFixContract.setText(zi.getfixconract());
//        	
//        	//setfixcontractdate
    		if(zi.getfixcontractdate() != null){
    			String g = format.format(zi.getfixcontractdate());
    			jtfFixContractDate.setText(g);
    		}
    		
    		//setfixconditionpayment
    		jtfFixConditionPayment.setText(zi.getfixconditionpayment());
        	
        	//setfixpoint
    		jtfFixPoint.setText(zi.getfixpoint());
        	
        	//shipper		 
    		jtfShipper.setText(zi.getshipper());
        	//shipperiin		
        	jtfShipperIin.setText(zi.getshipperiin());
        	//shipperaddress	
        	jtfShipperAddress.setText(zi.getshipperaddress());
        	//consignee	 
        	jtfConsignee.setText(zi.getconsignee());
        	//consigneeiin		 
        	jtfConsigneeIin.setText(zi.getconsigneeiin());
        	//consigneeaddress	 
        	jtfConsigneeAddress.setText(zi.getconsigneeaddress());
        	
        	
        	// fixrecipient 
        	jtfFixRecipient.setText(zi.getfixrecipient().trim());
        	// fixrecipientstatus
//        	zi.setfixrecipientstatus(new BigDecimal(jtfFixRecipient.getText()));
        	// fixrecipientiin 
        	jtfFixRecipientIin.setText(zi.getfixrecipientiin());
        	// fixrecipientaddress 
        	jtfFixRecipientAddress.setText(zi.getfixrecipientaddress());
        	// fixresipientserial 
        	jtfFixRecipientSerial.setText(zi.getfixrecipientserial());
        	// fixrecipientserialno 
        	jtfFixRecipientSerialNo.setText(Integer.valueOf(zi.getfixrecipientserialno()).toString());
        	
        	//currencytype
        	jtfCurrencyType.setText(zi.getCurrencyType());
        	  
        	jtfDetail1.setText(zi.getdetails1());
        	jtfDetail2.setText(zi.getdetails2());
        	jtfDetail3.setText(zi.getdetails3());

        	jtfOperator.setText(zi.getoperator());
        	jTextField63.setText(zi.getsign1());
        	jTextField64.setText(zi.getsign2());
        	
        }
        else{
        	
        	jtfDocNo.setBorder(borderBlue);
//        	jtfFixSupplier.setBorder(borderBlue);
//        	jtfFixSupplierIin.setBorder(borderBlue);
//        	jtfFixSupplierAddress.setBorder(borderBlue);
//        	jtfFixSupplierSerial.setBorder(borderBlue);
//        	jtfFixSupplierSerialNo.setBorder(borderBlue);
        	jtfFixRecipient.setEditable(false);
        	jtfFixRecipient2.setEditable(false);
        	jbBP.setBorder(borderBlue);
//        	jtfFixRecipient.setBorder(borderBlue);
//        	jtfFixRecipientIin.setBorder(borderBlue);
//        	jtfFixRecipientAddress.setBorder(borderBlue);
        	jTextField63.setEditable(false);
        	jbKey.setBorder(borderBlue);
        	
        	jTextField64.setEditable(false);
        	jcbMonths.setBorder(borderBlue);
        	jtfDay.setBorder(borderBlue);
//        	jtfYear.setBorder(borderBlue);
        	
    		jbSave.setText("Отправить");
    		jbKey.setEnabled(true);
    		jbKey2.setEnabled(false);
        	
        }
//        initJtree();
//        
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(zinvoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(zinvoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(zinvoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(zinvoice.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }        
//        jPanel11.setVisible(false);
//        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
//        setBounds(0,0,screenSize.width, screenSize.height);        
        
        if(state.equals("view") ){

        	JRootPane root =  (JRootPane) this.getComponent(0);
            JLayeredPane layer = (JLayeredPane) root.getComponent(1);
            JPanel panel = (JPanel) layer.getComponent(0);
            JScrollPane scroll = (JScrollPane) panel.getComponent(0);
            JViewport port = (JViewport) scroll.getComponent(0);
            panel = (JPanel) port.getComponent(0);
            layer = (JLayeredPane) panel.getComponent(0);
            int i = layer.getComponentCount();

            for(int j=0; j < i; j++){
                Component c = layer.getComponent(j);

                if(c instanceof JTextField || c instanceof JCheckBox || c instanceof JRadioButton || c instanceof JButton || c instanceof JComboBox )
                    c.setEnabled(false);
            }

        	
        }
        
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        jScrollPane1 = new javax.swing.JScrollPane();
        jPanel1 = new javax.swing.JPanel();
        jLayeredPane2 = new javax.swing.JLayeredPane();
        jLabel88 = new javax.swing.JLabel();
        jcbFix = new javax.swing.JCheckBox();
        jcbExt = new javax.swing.JCheckBox();
        jLabel90 = new javax.swing.JLabel();
        jLabel91 = new javax.swing.JLabel();
        jLabel92 = new javax.swing.JLabel();
        jLabel93 = new javax.swing.JLabel();
        jLabel94 = new javax.swing.JLabel();
        jLabel95 = new javax.swing.JLabel();
        jPanel16 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jPanel21 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jPanel23 = new javax.swing.JPanel();
        jLabel160 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jPanel25 = new javax.swing.JPanel();
        jLabel162 = new javax.swing.JLabel();
        jLabel163 = new javax.swing.JLabel();
        jLabel164 = new javax.swing.JLabel();
        jLabel165 = new javax.swing.JLabel();
        jLabel166 = new javax.swing.JLabel();
        jLabel167 = new javax.swing.JLabel();
        jLabel168 = new javax.swing.JLabel();
        jLabel169 = new javax.swing.JLabel();
        jLabel170 = new javax.swing.JLabel();
        jLabel171 = new javax.swing.JLabel();
        jLabel172 = new javax.swing.JLabel();
        jLabel173 = new javax.swing.JLabel();
        jLabel174 = new javax.swing.JLabel();
        jbSave = new javax.swing.JButton();
        jbCancel = new javax.swing.JButton();
        jtfFixRecipientSerialNo = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jtfFixSupplierSerialNo = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jtfYear = new javax.swing.JTextField();
        jtfFixDateAcct = new javax.swing.JTextField();
        jtfFixNo = new javax.swing.JTextField();
        jtfDocNo = new javax.swing.JTextField();
        jLabel175 = new javax.swing.JLabel();
        jTextField11 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jTextField12 = new javax.swing.JTextField();
        jLabel103 = new javax.swing.JLabel();
        jtfFixSupplierAddress2 = new javax.swing.JTextField();
        jLabel106 = new javax.swing.JLabel();
        jrbSupplier1 = new javax.swing.JRadioButton();
        jrbSupplier2 = new javax.swing.JRadioButton();
        jrbSupplier3 = new javax.swing.JRadioButton();
        jrbSupplier4 = new javax.swing.JRadioButton();
        jrbSupplier5 = new javax.swing.JRadioButton();
        jLabel107 = new javax.swing.JLabel();
        jLabel108 = new javax.swing.JLabel();
        jLabel110 = new javax.swing.JLabel();
        jLabel111 = new javax.swing.JLabel();
        jTextField14 = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jtfFixSupplierIin = new javax.swing.JTextField();
        jtfFixSupplierAddress = new javax.swing.JTextField();
        jLabel113 = new javax.swing.JLabel();
        jLabel114 = new javax.swing.JLabel();
        jLabel115 = new javax.swing.JLabel();
        jLabel116 = new javax.swing.JLabel();
        jLabel118 = new javax.swing.JLabel();
        jtfFixSupplier = new javax.swing.JTextField();
        jTextField18 = new javax.swing.JTextField();
        jTextField19 = new javax.swing.JTextField();
        jTextField20 = new javax.swing.JTextField();
        jTextField21 = new javax.swing.JTextField();
        jLabel176 = new javax.swing.JLabel();
        jTextField22 = new javax.swing.JTextField();
        jPanel4 = new javax.swing.JPanel();
        jLabel177 = new javax.swing.JLabel();
        jtfFixDocNo = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jtfFixDocDateAcct = new javax.swing.JTextField();
        jLabel120 = new javax.swing.JLabel();
        jtfFixSupplierSerial = new javax.swing.JTextField();
        jLabel121 = new javax.swing.JLabel();
        jtfShipperIin = new javax.swing.JTextField();
        jLabel123 = new javax.swing.JLabel();
        jLabel124 = new javax.swing.JLabel();
        jtfFixContractDate = new javax.swing.JTextField();
        jtfFixConditionPayment = new javax.swing.JTextField();
        jLabel126 = new javax.swing.JLabel();
        jtfFixConditionPayment2 = new javax.swing.JTextField();
        jLabel128 = new javax.swing.JLabel();
        jLabel129 = new javax.swing.JLabel();
        jLabel130 = new javax.swing.JLabel();
        jLabel131 = new javax.swing.JLabel();
        jLabel133 = new javax.swing.JLabel();
        jLabel134 = new javax.swing.JLabel();
        jtfFixContract = new javax.swing.JTextField();
        jTextField31 = new javax.swing.JTextField();
        jTextField32 = new javax.swing.JTextField();
        jTextField33 = new javax.swing.JTextField();
        jTextField34 = new javax.swing.JTextField();
        jLabel132 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        jPanel27 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jLabel97 = new javax.swing.JLabel();
        jLabel98 = new javax.swing.JLabel();
        jLabel99 = new javax.swing.JLabel();
        jLabel100 = new javax.swing.JLabel();
        jLabel101 = new javax.swing.JLabel();
        jLabel102 = new javax.swing.JLabel();
        jTextField35 = new javax.swing.JTextField();
        jtfConsigneeIin = new javax.swing.JTextField();
        jtfShipper = new javax.swing.JTextField();
        jtfConsigneeAddress = new javax.swing.JTextField();
        jtfConsignee = new javax.swing.JTextField();
        jtfShipperAddress = new javax.swing.JTextField();
        jLabel135 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jtfFixPoint = new javax.swing.JTextField();
        jtfFixRecipient = new javax.swing.JTextField();
        jLabel138 = new javax.swing.JLabel();
        jrbFixRecipient1 = new javax.swing.JRadioButton();
        jrbFixRecipient2 = new javax.swing.JRadioButton();
        jrbFixRecipient3 = new javax.swing.JRadioButton();
        jrbFixRecipient4 = new javax.swing.JRadioButton();
        jrbFixRecipient5 = new javax.swing.JRadioButton();
        jLabel139 = new javax.swing.JLabel();
        jLabel140 = new javax.swing.JLabel();
        jtfFixRecipient2 = new javax.swing.JTextField();
        jtfFixRecipientIin = new javax.swing.JTextField();
        jtfFixRecipientAddress = new javax.swing.JTextField();
        jPanel29 = new javax.swing.JPanel();
        jLabel142 = new javax.swing.JLabel();
        jLabel143 = new javax.swing.JLabel();
        jLabel144 = new javax.swing.JLabel();
        jtfFixRecipientAddress2 = new javax.swing.JTextField();
        jtfFixRecipientSerial = new javax.swing.JTextField();
        jPanel8 = new javax.swing.JPanel();
        jLabel145 = new javax.swing.JLabel();
        jLabel146 = new javax.swing.JLabel();
        jLabel147 = new javax.swing.JLabel();
        jLabel148 = new javax.swing.JLabel();
        jLabel149 = new javax.swing.JLabel();
        jLabel151 = new javax.swing.JLabel();
        jLabel152 = new javax.swing.JLabel();
        jLabel153 = new javax.swing.JLabel();
        jLabel154 = new javax.swing.JLabel();
        jLabel155 = new javax.swing.JLabel();
        jLabel156 = new javax.swing.JLabel();
        jLabel157 = new javax.swing.JLabel();
        jLabel158 = new javax.swing.JLabel();
        jLabel159 = new javax.swing.JLabel();
        jTextField48 = new javax.swing.JTextField();
        jTextField49 = new javax.swing.JTextField();
        jtfCurrencyType = new javax.swing.JTextField();
        jTextField51 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jTextField52 = new javax.swing.JTextField();
        jTextField53 = new javax.swing.JTextField();
        jTextField54 = new javax.swing.JTextField();
        jTextField55 = new javax.swing.JTextField();
        jTextField56 = new javax.swing.JTextField();
        jTextField57 = new javax.swing.JTextField();
        jTextField58 = new javax.swing.JTextField();
        jTextField59 = new javax.swing.JTextField();
        jTextField60 = new javax.swing.JTextField();
        jTextField61 = new javax.swing.JTextField();
        jLabel161 = new javax.swing.JLabel();
        jtfDateRecient = new javax.swing.JTextField();
        jtfDetail2 = new javax.swing.JTextField();
        jtfDetail3 = new javax.swing.JTextField();
        jtfDetail1 = new javax.swing.JTextField();
        jTextField63 = new javax.swing.JTextField();
        jTextField64 = new javax.swing.JTextField();
        jtfOperator = new javax.swing.JTextField();
        jLabel178 = new javax.swing.JLabel();
        jtfDateSend = new javax.swing.JTextField();
        jcbMonths = new javax.swing.JComboBox();
        jtfDay = new javax.swing.JTextField();
        jbKey = new javax.swing.JButton();
        jbKey2 = new javax.swing.JButton();
        jbBP = new javax.swing.JButton();

//        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
//        setAlwaysOnTop(true);
        setBackground(new java.awt.Color(254, 254, 254));
        setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        setPreferredSize(new java.awt.Dimension(1000, 700));
//
        jScrollPane1.setPreferredSize(new java.awt.Dimension(1000, 670));
//
        jPanel1.setBackground(java.awt.SystemColor.control);
        jPanel1.setPreferredSize(new java.awt.Dimension(900, 2150));

        jLayeredPane2.setBackground(java.awt.Color.lightGray);
        jLayeredPane2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jLayeredPane2.setPreferredSize(new java.awt.Dimension(900, 2150));

        jLabel88.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel88.setText("СЧЕТ-ФАКТУРА №");
        jLabel88.setBounds(220, 20, 100, 13);
        jLayeredPane2.add(jLabel88, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jcbFix.setBackground(java.awt.SystemColor.control);
        jcbFix.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
//        jcbFix.setSelected(true);
        jcbFix.setText("Исправленный счет-фактура");
        jcbFix.setBounds(130, 50, 175, 24);
        jLayeredPane2.add(jcbFix, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jcbExt.setBackground(java.awt.SystemColor.control);
        jcbExt.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jcbExt.setText("Дополнительный счет-фактура");
        jcbExt.setBounds(440, 50, 190, 24);
        jLayeredPane2.add(jcbExt, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel90.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel90.setText("Дата исправления, аннулирования");
        jLabel90.setBounds(30, 90, 180, 13);
        jLayeredPane2.add(jLabel90, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel91.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel91.setText("Порядковый номер исправления");
        jLabel91.setBounds(30, 110, 180, 13);
        jLayeredPane2.add(jLabel91, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel92.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel92.setText("Номер счета-фактуры, в которой вносятся исправления");
        jLabel92.setBounds(30, 128, 370, 13);
        jLayeredPane2.add(jLabel92, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel93.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel93.setText("№");
        jLabel93.setPreferredSize(new java.awt.Dimension(175, 18));
        jLabel93.setBounds(220, 480, 20, 18);
//        jLabel93.setEnabled(false);
        jLayeredPane2.add(jLabel93, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel94.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel94.setText("Номер счета-фактуры, к которому выписывается");
        jLabel94.setBounds(500, 90, 350, 13);
        jLayeredPane2.add(jLabel94, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel95.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel95.setText("дополнительный счет-фактура");
        jLabel95.setBounds(500, 110, 310, 13);
        jLayeredPane2.add(jLabel95, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel16.setBackground(new java.awt.Color(254, 254, 254));
        jPanel16.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 538, Short.MAX_VALUE)
        );

        jPanel16.setBounds(810, 750, 1, 540);
        jLayeredPane2.add(jPanel16, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel17.setBackground(new java.awt.Color(254, 254, 254));
        jPanel17.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 338, Short.MAX_VALUE)
        );

        jPanel17.setBounds(20, 170, 1, 340);
        jLayeredPane2.add(jPanel17, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel18.setBackground(new java.awt.Color(254, 254, 254));
        jPanel18.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 408, Short.MAX_VALUE)
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel18.setBounds(20, 170, 410, 1);
        jLayeredPane2.add(jPanel18, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel19.setBackground(new java.awt.Color(254, 254, 254));
        jPanel19.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 378, Short.MAX_VALUE)
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel19.setBounds(430, 170, 380, 1);
        jLayeredPane2.add(jPanel19, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel20.setBackground(new java.awt.Color(254, 254, 254));
        jPanel20.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 238, Short.MAX_VALUE)
        );

        jPanel20.setBounds(20, 510, 1, 240);
        jLayeredPane2.add(jPanel20, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel9.setBackground(new java.awt.Color(254, 254, 254));
        jPanel9.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 788, Short.MAX_VALUE)
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel9.setBounds(20, 510, 790, 1);
        jLayeredPane2.add(jPanel9, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel10.setBackground(new java.awt.Color(254, 254, 254));
        jPanel10.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 238, Short.MAX_VALUE)
        );

        jPanel10.setBounds(430, 510, 1, 240);
        jLayeredPane2.add(jPanel10, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel21.setBackground(new java.awt.Color(254, 254, 254));
        jPanel21.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel21.setPreferredSize(new java.awt.Dimension(30, 164));

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 158, Short.MAX_VALUE)
        );

        jPanel21.setBounds(20, 750, 1, 160);
        jLayeredPane2.add(jPanel21, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel22.setBackground(new java.awt.Color(254, 254, 254));
        jPanel22.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 378, Short.MAX_VALUE)
        );

        jPanel22.setBounds(20, 910, 1, 380);
        jLayeredPane2.add(jPanel22, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel23.setBackground(new java.awt.Color(254, 254, 254));
        jPanel23.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 788, Short.MAX_VALUE)
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel23.setBounds(20, 1290, 790, 1);
        jLayeredPane2.add(jPanel23, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel160.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel160.setText("Код валюты");
        jLabel160.setBounds(20, 1300, 70, 13);
        jLayeredPane2.add(jLabel160, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTable2.setBackground(java.awt.SystemColor.control);
        jTable2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jTable2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTable2.getTableHeader().setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTable2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane3.setViewportView(jTable2);

        jScrollPane3.setBounds(20, 1320, 790, 270);
        jLayeredPane2.add(jScrollPane3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel25.setBackground(java.awt.Color.lightGray);
        jPanel25.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 788, Short.MAX_VALUE)
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel25.setBounds(20, 1600, 790, 1);
        jLayeredPane2.add(jPanel25, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel162.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel162.setText("ЭЦП юридического лица (стрктурного подразделения юридического лица)");
        jLabel162.setBounds(20, 1720, 550, 13);
        jLayeredPane2.add(jLabel162, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel163.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel163.setText("или индивидуального предпринемателя");
        jLabel163.setBounds(20, 1740, 220, 13);
        jLayeredPane2.add(jLabel163, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel164.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel164.setText("М.П.");
        jLabel164.setBounds(710, 1760, 23, 13);
        jLayeredPane2.add(jLabel164, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel165.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel165.setText("ЭЦП лица, уполномоченного подписать счета");
        jLabel165.setBounds(20, 1780, 610, 13);
        jLayeredPane2.add(jLabel165, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel166.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel166.setText("фактуры");
        jLabel166.setBounds(20, 1800, 60, 13);
        jLayeredPane2.add(jLabel166, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel167.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel167.setText("(Ф.И.О., подпись)");
        jLabel167.setBounds(340, 1830, 140, 13);
        jLayeredPane2.add(jLabel167, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel168.setFont(new java.awt.Font("Tahoma", 2, 10)); // NOI18N
        jLabel168.setText("Строки, заполняемые автоматически");
        jLabel168.setBounds(270, 1890, 210, 13);
        jLayeredPane2.add(jLabel168, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel169.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel169.setText("Регистрационный номер оператора");
        jLabel169.setBounds(480, 1890, 190, 13);
        jLayeredPane2.add(jLabel169, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel170.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel170.setText("Дата отправки документа");
        jLabel170.setBounds(525, 1915, 140, 13);
        jLayeredPane2.add(jLabel170, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel171.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel171.setText("покупателем");
        jLabel171.setBounds(595, 1955, 70, 13);
        jLayeredPane2.add(jLabel171, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel172.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel172.setText("Примечание:");
        jLabel172.setBounds(20, 2000, 150, 13);
        jLayeredPane2.add(jLabel172, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel173.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel173.setText("* данная строка заполняется при наличии вышеуказанных статусов");
        jLabel173.setBounds(70, 2030, 530, 13);
        jLayeredPane2.add(jLabel173, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel174.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel174.setText("Выделенное жирным шрифтом подлежит обязательному заполнению");
        jLabel174.setBounds(70, 2050, 550, 13);
        jLayeredPane2.add(jLabel174, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jbSave.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jbSave.setText("Сохранить");
        jbSave.setName("Send"); // NOI18N
        jbSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbSaveActionPerformed(evt);
            }
        });
        jbSave.setBounds(600, 2080, 130, 26);
        	jbSave.setIcon(new ImageIcon(getClass().getResource("images/post-accept-icon.png"))); 
        jLayeredPane2.add(jbSave, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jbCancel.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jbCancel.setText("Отмена");
        jbCancel.setBounds(730, 2080, 90, 26);
        jbCancel.setIcon(new javax.swing.ImageIcon(getClass().getResource("images/post-delete-icon.png")));
        jbCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
            	jbCancelActionPerformed(evt);
            }
        });
        jLayeredPane2.add(jbCancel, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipientSerialNo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipientSerialNo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipientSerialNo.setBounds(210, 1260, 190, 20);
        jtfFixRecipientSerialNo.setEditable(false);
        jLayeredPane2.add(jtfFixRecipientSerialNo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel1.setText("от");
        jLabel1.setBounds(395, 20, 12, 13);
        jLayeredPane2.add(jLabel1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplierSerialNo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplierSerialNo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixSupplierSerialNo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplierSerialNo.setBounds(240, 480, 160, 20);
        jtfFixSupplierSerialNo.setEditable(false);
//        jtfFixSupplierSerialNo.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixSupplierSerialNo.getText().equals(""))
//                	jtfFixSupplierSerialNo.setBorder(borderDefault);
//                else
//                	jtfFixSupplierSerialNo.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixSupplierSerialNo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel2.setText("г.");
        jLabel2.setBounds(590, 20, 7, 13);
        jLayeredPane2.add(jLabel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfYear.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfYear.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfYear.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfYear.setBounds(542, 16, 40, 20);
        jtfYear.setText(Integer.valueOf(new Date().getYear() + 1900).toString());
        jtfYear.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                char c = e.getKeyChar();  
                if (!(Character.isDigit(c) ||  
                   (c == KeyEvent.VK_BACK_SPACE) ||  
                   (c == KeyEvent.VK_DELETE))) {  
                     e.consume();  
                   }
                if(Character.isDigit(c) || !jtfYear.getText().equals(""))
                	jtfYear.setBorder(borderDefault);
                else
                	jtfYear.setBorder(borderBlue);
                	
        }});

        jLayeredPane2.add(jtfYear, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixDateAcct.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixDateAcct.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixDateAcct.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixDateAcct.setBounds(212, 85, 80, 20);
        jLayeredPane2.add(jtfFixDateAcct, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixNo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixNo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixNo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixNo.setBounds(212, 107, 80, 20);
        jtfFixNo.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                char c = e.getKeyChar();  
                if (!(Character.isDigit(c) ||  
                   (c == KeyEvent.VK_BACK_SPACE) ||  
                   (c == KeyEvent.VK_DELETE))) {  
                     e.consume();  
                   }
        }});
        
        jLayeredPane2.add(jtfFixNo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDocNo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDocNo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfDocNo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfDocNo.setBounds(330, 16, 60, 20);
        jtfDocNo.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                char c = e.getKeyChar();  
                if (!(Character.isDigit(c) ||  
                   (c == KeyEvent.VK_BACK_SPACE) ||  
                   (c == KeyEvent.VK_DELETE))) {  
                     e.consume();  
                   }
                if(Character.isDigit(c) || !jtfDocNo.getText().equals(""))
                	jtfDocNo.setBorder(borderDefault);
                else
                	jtfDocNo.setBorder(borderBlue);
                	
        }});
        
        jLayeredPane2.add(jtfDocNo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel175.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel175.setText("№");
        jLabel175.setPreferredSize(new java.awt.Dimension(175, 18));
        jLabel175.setBounds(500, 130, 20, 18);
        jLayeredPane2.add(jLabel175, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField11.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField11.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextField11.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField11.setBounds(570, 320, 60, 20);
        jLayeredPane2.add(jTextField11, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel4.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel4.setText("от");
        jLabel4.setBounds(580, 130, 20, 13);
        jLayeredPane2.add(jLabel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField12.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField12.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField12.setBounds(598, 127, 80, 20);
        jLayeredPane2.add(jTextField12, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel103.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel103.setText("Поставщик/продавец");
        jLabel103.setBounds(60, 180, 114, 13);
//        jLabel103.setEnabled(false);
        jLayeredPane2.add(jLabel103, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplierAddress2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplierAddress2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplierAddress2.setBounds(60, 410, 340, 20);
        jtfFixSupplierAddress2.setEditable(false);
        jLayeredPane2.add(jtfFixSupplierAddress2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel106.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel106.setText("Статус поставщика");
        jLabel106.setBounds(60, 235, 120, 13);
//        jLabel106.setEnabled(false);
        jLayeredPane2.add(jLabel106, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbSupplier1.setBackground(java.awt.SystemColor.control);
        jrbSupplier1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbSupplier1.setSelected(true);
        jrbSupplier1.setText("коминент");
        jrbSupplier1.setBounds(60, 250, 73, 18);
        buttonGroup1.add(jrbSupplier1);
//        jrbSupplier1.setEnabled(false);
        jLayeredPane2.add(jrbSupplier1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbSupplier2.setBackground(java.awt.SystemColor.control);
        jrbSupplier2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbSupplier2.setText("комиссионер");
        jrbSupplier2.setBounds(60, 270, 89, 18);
        buttonGroup1.add(jrbSupplier2);
//        jrbSupplier2.setEditable(false);
        jLayeredPane2.add(jrbSupplier2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbSupplier3.setBackground(java.awt.SystemColor.control);
        jrbSupplier3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbSupplier3.setText("участник совместной деятельности");
        jrbSupplier3.setBounds(60, 290, 200, 18);
        buttonGroup1.add(jrbSupplier3);
//        jrbSupplier3.setEnabled(false);
        jLayeredPane2.add(jrbSupplier3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbSupplier4.setBackground(java.awt.SystemColor.control);
        jrbSupplier4.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbSupplier4.setText("экспедитор");
        jrbSupplier4.setBounds(60, 310, 83, 18);
        buttonGroup1.add(jrbSupplier4);
//        jrbSupplier4.setEnabled(false);
        jLayeredPane2.add(jrbSupplier4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbSupplier5.setBackground(java.awt.SystemColor.control);
        jrbSupplier5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbSupplier5.setText("лизингодатель");
        jrbSupplier5.setBounds(60, 330, 98, 16);
        buttonGroup1.add(jrbSupplier5);
//        jrbSupplier5.setEnabled(false);
        jLayeredPane2.add(jrbSupplier5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel107.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel107.setText("ИИН/БИН");
        jLabel107.setBounds(60, 360, 50, 13);
//        jLabel107.setEnabled(false);
        jLayeredPane2.add(jLabel107, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel108.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel108.setText("Адрес места нахождения");
        jLabel108.setBounds(60, 390, 134, 13);
//        jLabel108.setEnabled(false);
        jLayeredPane2.add(jLabel108, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel110.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel110.setText("Серия и номер свидетельства поставщика-плательщика");
        jLabel110.setBounds(60, 440, 336, 13);
//        jLabel110.setEnabled(false);
        jLayeredPane2.add(jLabel110, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel111.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel111.setText("НДС о постановке на регистрационный учет по НДС");
        jLabel111.setBounds(60, 460, 271, 13);
//        jLabel111.setEnabled(false);
        jLayeredPane2.add(jLabel111, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField14.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField14.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField14.setBounds(470, 345, 310, 20);
        jLayeredPane2.add(jTextField14, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 338, Short.MAX_VALUE)
        );

        jPanel3.setBounds(430, 170, 1, 340);
        jLayeredPane2.add(jPanel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplierIin.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplierIin.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixSupplierIin.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplierIin.setBounds(112, 355, 288, 20);
        jtfFixSupplierIin.setEditable(false);
//        jtfFixSupplierIin.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixSupplierIin.getText().equals(""))
//                	jtfFixSupplierIin.setBorder(borderDefault);
//                else
//                	jtfFixSupplierIin.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixSupplierIin, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplierAddress.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplierAddress.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplierAddress.setBounds(200, 386, 200, 20);
        jtfFixSupplierAddress.setEditable(false);
//        jtfFixSupplierAddress.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixSupplierAddress.getText().equals(""))
//                	jtfFixSupplierAddress.setBorder(borderDefault);
//                else
//                	jtfFixSupplierAddress.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixSupplierAddress, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel113.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel113.setText("Графа заполняется в случае, если товары, работы, услуги");
        jLabel113.setBounds(440, 180, 360, 13);
        jLayeredPane2.add(jLabel113, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel114.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel114.setText("реализуются государственному учреждению");
        jLabel114.setBounds(440, 200, 310, 13);
        jLayeredPane2.add(jLabel114, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel115.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel115.setText("КБе");
        jLabel115.setBounds(440, 230, 17, 13);
        jLayeredPane2.add(jLabel115, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel116.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel116.setText("Банк");
        jLabel116.setBounds(440, 260, 30, 13);
        jLayeredPane2.add(jLabel116, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel118.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel118.setText("ИИК");
        jLabel118.setBounds(540, 325, 30, 13);
        jLayeredPane2.add(jLabel118, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplier.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplier.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        jtfFixSupplier.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplier.setBounds(60, 200, 265, 20);
        jtfFixSupplier.setEditable(false);
//        jtfFixSupplier.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixSupplier.getText().equals(""))
//                	jtfFixSupplier.setBorder(borderDefault);
//                else
//                	jtfFixSupplier.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixSupplier, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField18.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField18.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextField18.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField18.setBounds(470, 230, 310, 20);
        jLayeredPane2.add(jTextField18, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField19.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField19.setHorizontalAlignment(javax.swing.JTextField.LEFT);
        jTextField19.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField19.setBounds(470, 260, 310, 20);
        jLayeredPane2.add(jTextField19, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField20.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField20.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField20.setBounds(518, 127, 60, 20);
        jLayeredPane2.add(jTextField20, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField21.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField21.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jTextField21.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField21.setBounds(470, 320, 60, 20);
        jLayeredPane2.add(jTextField21, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel176.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel176.setText("БИК");
        jLabel176.setBounds(440, 325, 30, 13);
        jLayeredPane2.add(jLabel176, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField22.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField22.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField22.setBounds(470, 285, 310, 20);
        jLayeredPane2.add(jTextField22, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel4.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 338, Short.MAX_VALUE)
        );

        jPanel4.setBounds(810, 170, 1, 340);
        jLayeredPane2.add(jPanel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel177.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel177.setText("№");
        jLabel177.setPreferredSize(new java.awt.Dimension(175, 18));
        jLabel177.setBounds(30, 148, 20, 18);
        jLayeredPane2.add(jLabel177, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixDocNo.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixDocNo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixDocNo.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixDocNo.setBounds(48, 145, 60, 20);
        jtfFixDocNo.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                char c = e.getKeyChar();  
                if (!(Character.isDigit(c) ||  
                   (c == KeyEvent.VK_BACK_SPACE) ||  
                   (c == KeyEvent.VK_DELETE))) {  
                     e.consume();  
                   }
        }});
        jLayeredPane2.add(jtfFixDocNo, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel5.setText("от");
        jLabel5.setBounds(112, 150, 20, 13);
        jLayeredPane2.add(jLabel5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixDocDateAcct.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixDocDateAcct.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixDocDateAcct.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixDocDateAcct.setBounds(130, 145, 80, 20);
        jLayeredPane2.add(jtfFixDocDateAcct, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel120.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel120.setText("Договор (конракт) на поставку товаров (работ, услуг) №");
        jLabel120.setBounds(60, 520, 283, 13);
        jLayeredPane2.add(jLabel120, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixSupplierSerial.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixSupplierSerial.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfFixSupplierSerial.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixSupplierSerial.setBounds(60, 480, 150, 20);
        jtfFixSupplierSerial.setEditable(false);
//        jtfFixSupplierSerial.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixSupplierSerial.getText().equals(""))
//                	jtfFixSupplierSerial.setBorder(borderDefault);
//                else
//                	jtfFixSupplierSerial.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixSupplierSerial, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel121.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel121.setText("от");
        jLabel121.setBounds(310, 543, 12, 13);
        jLayeredPane2.add(jLabel121, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfShipperIin.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfShipperIin.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfShipperIin.setBounds(110, 780, 680, 20);
        jLayeredPane2.add(jtfShipperIin, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel123.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel123.setText("Условия оплаты по");
        jLabel123.setBounds(60, 590, 98, 14);
        jLayeredPane2.add(jLabel123, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel124.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel124.setText("договору");
        jLabel124.setBounds(60, 610, 45, 13);
        jLayeredPane2.add(jLabel124, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixContractDate.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixContractDate.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixContractDate.setBounds(90, 563, 210, 20);
        jLayeredPane2.add(jtfFixContractDate, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixConditionPayment.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixConditionPayment.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixConditionPayment.setBounds(110, 607, 290, 20);
        jLayeredPane2.add(jtfFixConditionPayment, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel126.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel126.setText("Пункт назначения поставляемых товаров (работ, услуг)");
        jLabel126.setBounds(60, 660, 340, 13);
        jLayeredPane2.add(jLabel126, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixConditionPayment2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixConditionPayment2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixConditionPayment2.setBounds(60, 630, 340, 20);
        jLayeredPane2.add(jtfFixConditionPayment2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel128.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel128.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel128.setText("(область, город, район)");
        jLabel128.setBounds(70, 700, 330, 13);
        jLayeredPane2.add(jLabel128, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel129.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel129.setText("Поставка товаров осуществленна по доверенности №");
        jLabel129.setBounds(440, 520, 281, 14);
        jLayeredPane2.add(jLabel129, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel130.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel130.setText("от");
        jLabel130.setBounds(663, 630, 15, 13);
        jLayeredPane2.add(jLabel130, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel131.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel131.setText("Способ отправления");
        jLabel131.setBounds(440, 570, 101, 13);
        jLayeredPane2.add(jLabel131, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel133.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel133.setText("Документы, подтверждающие поставку товаров (работ,");
        jLabel133.setBounds(440, 610, 277, 13);
        jLayeredPane2.add(jLabel133, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel134.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel134.setText("услуг) №");
        jLabel134.setBounds(440, 630, 45, 13);
        jLayeredPane2.add(jLabel134, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixContract.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixContract.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixContract.setBounds(90, 540, 210, 20);
        jLayeredPane2.add(jtfFixContract, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField31.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField31.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField31.setBounds(440, 540, 130, 20);
        jLayeredPane2.add(jTextField31, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField32.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField32.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField32.setBounds(590, 540, 200, 20);
        jLayeredPane2.add(jTextField32, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField33.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField33.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField33.setBounds(490, 625, 170, 20);
        jLayeredPane2.add(jTextField33, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField34.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField34.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField34.setBounds(440, 1030, 350, 20);
        jLayeredPane2.add(jTextField34, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel132.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel132.setText("от");
        jLabel132.setBounds(575, 545, 20, 13);
        jLayeredPane2.add(jLabel132, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 238, Short.MAX_VALUE)
        );

        jPanel5.setBounds(810, 510, 1, 240);
        jLayeredPane2.add(jPanel5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel26.setBackground(new java.awt.Color(254, 254, 254));
        jPanel26.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 338, Short.MAX_VALUE)
        );

        jPanel26.setBounds(50, 170, 1, 340);
        jLayeredPane2.add(jPanel26, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel27.setBackground(new java.awt.Color(254, 254, 254));
        jPanel27.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 238, Short.MAX_VALUE)
        );

        jPanel27.setBounds(50, 510, 1, 240);
        jLayeredPane2.add(jPanel27, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel6.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 788, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel6.setBounds(20, 750, 790, 1);
        jLayeredPane2.add(jPanel6, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel28.setBackground(new java.awt.Color(254, 254, 254));
        jPanel28.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        jPanel28.setPreferredSize(new java.awt.Dimension(30, 164));

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 158, Short.MAX_VALUE)
        );

        jPanel28.setBounds(50, 750, 1, 160);
        jLayeredPane2.add(jPanel28, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel97.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel97.setText("Грузоотправитель");
        jLabel97.setBounds(60, 760, 90, 13);
        jLayeredPane2.add(jLabel97, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel98.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel98.setText("ИИН/БИН");
        jLabel98.setBounds(60, 785, 45, 13);
        jLayeredPane2.add(jLabel98, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel99.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel99.setText("Адрес грузотправителя");
        jLabel99.setBounds(60, 810, 115, 13);
        jLayeredPane2.add(jLabel99, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel100.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel100.setText("Грузополучатель");
        jLabel100.setBounds(60, 835, 84, 13);
        jLayeredPane2.add(jLabel100, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel101.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel101.setText("ИИН/БИН");
        jLabel101.setBounds(60, 860, 45, 13);
        jLayeredPane2.add(jLabel101, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel102.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel102.setText("Адрес грузотправителя");
        jLabel102.setBounds(60, 885, 115, 13);
        jLayeredPane2.add(jLabel102, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField35.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField35.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField35.setBounds(440, 585, 350, 20);
        jLayeredPane2.add(jTextField35, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfConsigneeIin.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfConsigneeIin.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfConsigneeIin.setBounds(110, 855, 680, 20);
        jLayeredPane2.add(jtfConsigneeIin, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfShipper.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfShipper.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfShipper.setBounds(160, 755, 630, 20);
        jLayeredPane2.add(jtfShipper, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfConsigneeAddress.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfConsigneeAddress.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfConsigneeAddress.setBounds(180, 880, 610, 20);
        jLayeredPane2.add(jtfConsigneeAddress, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfConsignee.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfConsignee.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfConsignee.setBounds(150, 830, 640, 20);
        jLayeredPane2.add(jtfConsignee, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfShipperAddress.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfShipperAddress.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfShipperAddress.setBounds(180, 805, 610, 20);
        jLayeredPane2.add(jtfShipperAddress, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel135.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel135.setText("Получатель/покупатель");
        jLabel135.setBounds(60, 920, 129, 13);
//        jLabel135.setEnabled(false);
        jLayeredPane2.add(jLabel135, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel7.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 788, Short.MAX_VALUE)
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );

        jPanel7.setBounds(20, 910, 790, 1);
        jLayeredPane2.add(jPanel7, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixPoint.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixPoint.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixPoint.setBounds(60, 677, 340, 20);
        jLayeredPane2.add(jtfFixPoint, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipient.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipient.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipient.setBounds(60, 940, 310, 20);
        jtfFixRecipient.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                if(!jtfFixRecipient.getText().equals(""))
                	jtfFixRecipient.setBorder(borderDefault);
                else
                	jtfFixRecipient.setBorder(borderBlue);
                	
        }});
        jLayeredPane2.add(jtfFixRecipient, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel138.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel138.setText("Статус получателя");
        jLabel138.setBounds(60, 1000, 94, 13);
//        jLabel138.setEnabled(false);
        jLayeredPane2.add(jLabel138, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbFixRecipient1.setBackground(java.awt.SystemColor.control);
        jrbFixRecipient1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbFixRecipient1.setSelected(true);
        jrbFixRecipient1.setText("коминент");
        jrbFixRecipient1.setBounds(60, 1020, 73, 18);
//        jrbFixRecipient1.setEnabled(false);
        buttonGroup2.add(jrbFixRecipient1);
        jLayeredPane2.add(jrbFixRecipient1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbFixRecipient2.setBackground(java.awt.SystemColor.control);
        jrbFixRecipient2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbFixRecipient2.setText("комиссионер");
        jrbFixRecipient2.setBounds(60, 1040, 89, 18);
//        jrbFixRecipient2.setEnabled(false);
        buttonGroup2.add(jrbFixRecipient2);
        jLayeredPane2.add(jrbFixRecipient2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbFixRecipient3.setBackground(java.awt.SystemColor.control);
        jrbFixRecipient3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbFixRecipient3.setText("участник совместной деятельности");
        jrbFixRecipient3.setBounds(60, 1060, 200, 18);
//        jrbFixRecipient3.setEnabled(false);
        buttonGroup2.add(jrbFixRecipient3);
        jLayeredPane2.add(jrbFixRecipient3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbFixRecipient4.setBackground(java.awt.SystemColor.control);
        jrbFixRecipient4.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbFixRecipient4.setText("экспедитор");
        jrbFixRecipient4.setBounds(60, 1080, 83, 18);
//        jrbFixRecipient4.setEnabled(false);
        buttonGroup2.add(jrbFixRecipient4);
        jLayeredPane2.add(jrbFixRecipient4, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jrbFixRecipient5.setBackground(java.awt.SystemColor.control);
        jrbFixRecipient5.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jrbFixRecipient5.setText("лизингополучатель");
        jrbFixRecipient5.setBounds(60, 1100, 121, 16);
//        jrbFixRecipient5.setEnabled(false);
        buttonGroup2.add(jrbFixRecipient5);
        jLayeredPane2.add(jrbFixRecipient5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel139.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel139.setText("ИИН/БИН");
        jLabel139.setBounds(60, 1130, 50, 13);
//        jLabel139.setEnabled(false);
        jLayeredPane2.add(jLabel139, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel140.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel140.setText("Адрес места нахождения");
        jLabel140.setBounds(60, 1150, 134, 13);
//        jLabel140.setEnabled(false);
        jLayeredPane2.add(jLabel140, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipient2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipient2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipient2.setBounds(60, 965, 340, 20);
        jLayeredPane2.add(jtfFixRecipient2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipientIin.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipientIin.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipientIin.setBounds(118, 1123, 280, 20);
        jtfFixRecipientIin.setEditable(false);
//        jtfFixRecipientIin.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixRecipientIin.getText().equals(""))
//                	jtfFixRecipientIin.setBorder(borderDefault);
//                else
//                	jtfFixRecipientIin.setBorder(borderBlue);
//                	
//        }});
        jLayeredPane2.add(jtfFixRecipientIin, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipientAddress.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipientAddress.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipientAddress.setBounds(60, 1170, 340, 20);
        jtfFixRecipientAddress.setEditable(false);
//        jtfFixRecipientAddress.addKeyListener(new KeyAdapter() {  
//            public void keyTyped(KeyEvent e) {  
//                if(!jtfFixRecipientAddress.getText().equals(""))
//                	jtfFixRecipientAddress.setBorder(borderDefault);
//                else
//                	jtfFixRecipientAddress.setBorder(borderBlue);
//                	
//        }});
        
        jLayeredPane2.add(jtfFixRecipientAddress, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel29.setBackground(new java.awt.Color(254, 254, 254));
        jPanel29.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 378, Short.MAX_VALUE)
        );

        jPanel29.setBounds(50, 910, 1, 380);
        jLayeredPane2.add(jPanel29, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel142.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel142.setText("Серия и номер свидетельства получателя-плательщика");
        jLabel142.setBounds(60, 1220, 336, 13);
//        jLabel142.setEnabled(false);
        jLayeredPane2.add(jLabel142, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel143.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel143.setText("НДС о постановке на регистрационный учет по НДС");
        jLabel143.setBounds(60, 1240, 256, 13);
//        jLabel143.setEnabled(false);
        jLayeredPane2.add(jLabel143, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel144.setText("№");
        jLabel144.setBounds(192, 1262, 15, 14);
//        jLabel144.setEnabled(false);
        jLayeredPane2.add(jLabel144, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipientAddress2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipientAddress2.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipientAddress2.setBounds(60, 1195, 340, 20);
        jtfFixRecipientAddress2.setEditable(false);
        jLayeredPane2.add(jtfFixRecipientAddress2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfFixRecipientSerial.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfFixRecipientSerial.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfFixRecipientSerial.setBounds(60, 1260, 130, 20);
        jtfFixRecipientSerial.setEditable(false);
        jLayeredPane2.add(jtfFixRecipientSerial, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jPanel8.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 378, Short.MAX_VALUE)
        );

        jPanel8.setBounds(430, 910, 1, 380);
        jLayeredPane2.add(jPanel8, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel145.setFont(new java.awt.Font("Tahoma", 2, 10)); // NOI18N
        jLabel145.setText("Графа заполняется в случае, если товары, работы, услуги");
        jLabel145.setBounds(440, 920, 300, 13);
        jLayeredPane2.add(jLabel145, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel146.setFont(new java.awt.Font("Tahoma", 2, 10)); // NOI18N
        jLabel146.setText("реализуются государственному учреждению");
        jLabel146.setBounds(440, 937, 270, 13);
        jLayeredPane2.add(jLabel146, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel147.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel147.setText("Код ГУ");
        jLabel147.setBounds(440, 960, 40, 13);
        jLayeredPane2.add(jLabel147, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel148.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel148.setText("Код");
        jLabel148.setBounds(440, 985, 30, 13);
        jLayeredPane2.add(jLabel148, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel149.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel149.setText("Териториальное подразделение казначейства");
        jLabel149.setBounds(440, 1010, 223, 13);
        jLayeredPane2.add(jLabel149, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel151.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel151.setText("БИК KKMFKZ2A");
        jLabel151.setBounds(440, 1060, 80, 13);
        jLayeredPane2.add(jLabel151, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel152.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel152.setText("Источник финансирования");
        jLabel152.setBounds(440, 1085, 140, 13);
        jLayeredPane2.add(jLabel152, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel153.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel153.setText("Вид бюджета");
        jLabel153.setBounds(440, 1110, 80, 13);
        jLayeredPane2.add(jLabel153, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel154.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel154.setText("КБК расходов");
        jLabel154.setBounds(440, 1135, 70, 13);
        jLayeredPane2.add(jLabel154, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel155.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel155.setText("Код расходов (работ, услуг)");
        jLabel155.setBounds(440, 1160, 140, 13);
        jLayeredPane2.add(jLabel155, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel156.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel156.setText("Статус платежа");
        jLabel156.setBounds(440, 1185, 90, 13);
        jLayeredPane2.add(jLabel156, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel157.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel157.setText("Назначение платежа");
        jLabel157.setBounds(440, 1210, 110, 13);
        jLayeredPane2.add(jLabel157, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel158.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel158.setText("КПН");
        jLabel158.setBounds(440, 1235, 30, 13);
        jLayeredPane2.add(jLabel158, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel159.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel159.setText("КБК поступлений");
        jLabel159.setBounds(440, 1260, 90, 13);
        jLayeredPane2.add(jLabel159, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField48.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField48.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField48.setBounds(680, 625, 110, 20);
        jLayeredPane2.add(jTextField48, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField49.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField49.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField49.setBounds(480, 955, 180, 20);
        jLayeredPane2.add(jTextField49, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfCurrencyType.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfCurrencyType.setText("KZT");
        jtfCurrencyType.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jtfCurrencyType.setBounds(90, 1295, 110, 20);
        jLayeredPane2.add(jtfCurrencyType, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField51.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField51.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField51.setBounds(470, 980, 190, 20);
        jLayeredPane2.add(jTextField51, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel3.setText("ИИК");
        jLabel3.setBounds(625, 1060, 20, 13);
        jLayeredPane2.add(jLabel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField52.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField52.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField52.setBounds(520, 1055, 100, 20);
        jLayeredPane2.add(jTextField52, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField53.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField53.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField53.setBounds(650, 1055, 140, 20);
        jLayeredPane2.add(jTextField53, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField54.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField54.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField54.setBounds(580, 1080, 210, 20);
        jLayeredPane2.add(jTextField54, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField55.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField55.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField55.setBounds(510, 1105, 280, 20);
        jLayeredPane2.add(jTextField55, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField56.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField56.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField56.setBounds(510, 1130, 280, 20);
        jLayeredPane2.add(jTextField56, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField57.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField57.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField57.setBounds(590, 1155, 200, 20);
        jLayeredPane2.add(jTextField57, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField58.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField58.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField58.setBounds(530, 1180, 260, 20);
        jLayeredPane2.add(jTextField58, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField59.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField59.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField59.setBounds(550, 1205, 240, 20);
        jLayeredPane2.add(jTextField59, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField60.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField60.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField60.setBounds(470, 1230, 320, 20);
        jLayeredPane2.add(jTextField60, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField61.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField61.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jTextField61.setBounds(530, 1255, 260, 20);
        jLayeredPane2.add(jTextField61, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel161.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jLabel161.setText("Дополнительные сведения");
        jLabel161.setBounds(30, 1610, 129, 13);
        jLayeredPane2.add(jLabel161, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDateRecient.setBackground(java.awt.Color.lightGray);
        jtfDateRecient.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDateRecient.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfDateRecient.setBorder(null);
        jtfDateRecient.setBounds(670, 1935, 130, 20);
        jLayeredPane2.add(jtfDateRecient, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDetail2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDetail2.setBorder(null);
        jtfDetail2.setBounds(100, 1655, 690, 20);
        jLayeredPane2.add(jtfDetail2, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDetail3.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDetail3.setBorder(null);
        jtfDetail3.setBounds(100, 1680, 690, 20);
        jLayeredPane2.add(jtfDetail3, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDetail1.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDetail1.setBorder(null);
        jtfDetail1.setBounds(100, 1630, 690, 20);
        jLayeredPane2.add(jtfDetail1, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField63.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField63.setBorder(null);
        jTextField63.setBounds(235, 1735, 450, 20);
        jTextField63.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                if(!jTextField63.getText().equals(""))
                	jTextField63.setBorder(borderDefault);
                else
                	jTextField63.setBorder(borderBlue);
                	
        }});
        jLayeredPane2.add(jTextField63, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jTextField64.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jTextField64.setBorder(null);
        jTextField64.setBounds(80, 1795, 450, 20);
        jTextField64.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                if(!jTextField64.getText().equals(""))
                	jTextField64.setBorder(borderDefault);
                else
                	jTextField64.setBorder(borderBlue);
                	
        }});
        
        jLayeredPane2.add(jTextField64, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfOperator.setBackground(java.awt.Color.lightGray);
        jtfOperator.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfOperator.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfOperator.setBorder(null);
        jtfOperator.setBounds(670, 1885, 130, 20);
        jLayeredPane2.add(jtfOperator, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jLabel178.setFont(new java.awt.Font("Tahoma", 1, 10)); // NOI18N
        jLabel178.setText("Дата получения документа ");
        jLabel178.setBounds(520, 1940, 150, 13);
        jLayeredPane2.add(jLabel178, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDateSend.setBackground(java.awt.Color.lightGray);
        jtfDateSend.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDateSend.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        jtfDateSend.setBorder(null);
        jtfDateSend.setBounds(670, 1910, 130, 20);
        jLayeredPane2.add(jtfDateSend, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jcbMonths.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jcbMonths.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "января", "февраля", "марта", "апреля", "мая", "июня", "июля", "августа", "сентября", "октября", "ноября", "декабря", " " }));
        jcbMonths.setPreferredSize(new java.awt.Dimension(65, 20));
        jcbMonths.setBounds(440, 16, 100, 20);
        jcbMonths.setSelectedIndex(12);
        jcbMonths.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbMonthsActionPerformed(evt);
            }
        });
        
        jLayeredPane2.add(jcbMonths, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jtfDay.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jtfDay.setPreferredSize(new java.awt.Dimension(63, 20));
        jtfDay.setBounds(408, 16, 30, 20);
        jtfDay.addKeyListener(new KeyAdapter() {  
            public void keyTyped(KeyEvent e) {  
                char c = e.getKeyChar();  
                if (!(Character.isDigit(c) ||  
                   (c == KeyEvent.VK_BACK_SPACE) ||  
                   (c == KeyEvent.VK_DELETE))) {  
                     e.consume();  
                   }
                if(Character.isDigit(c) || !jtfDay.getText().equals(""))
//                if(!jtfDay.getText().equals(""))
                	jtfDay.setBorder(borderDefault);
                else
                	jtfDay.setBorder(borderBlue);
                	
        }});

        jLayeredPane2.add(jtfDay, javax.swing.JLayeredPane.DEFAULT_LAYER);

        jbKey.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jbKey.setActionCommand("");
        jbKey.setPreferredSize(new java.awt.Dimension(50, 20));
        jbKey.setIcon(new javax.swing.ImageIcon(getClass().getResource("images/key-icon.png"))); // NOI18N
        jbKey.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbKeyActionPerformed(evt);
            }
        });
        jbKey.setBounds(690, 1735, 30, 20);
        jLayeredPane2.add(jbKey, javax.swing.JLayeredPane.DEFAULT_LAYER);
        
        
        jbKey2.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jbKey2.setActionCommand("");
        jbKey2.setPreferredSize(new java.awt.Dimension(50, 20));
        jbKey2.setIcon(new javax.swing.ImageIcon(getClass().getResource("images/key-icon.png"))); // NOI18N
        jbKey2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbKey2ActionPerformed(evt);
            }
        });
        jbKey2.setBounds(535, 1795, 30, 20);
        jLayeredPane2.add(jbKey2, javax.swing.JLayeredPane.DEFAULT_LAYER);
        
        jbBP.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
        jbBP.setBounds(370, 940, 30, 20);
        jbBP.setIcon(new javax.swing.ImageIcon(getClass().getResource("images/search-icon.png"))); // NOI18N
        jbBP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbBPActionPerformed(evt);
            }
        });
        jLayeredPane2.add(jbBP, javax.swing.JLayeredPane.DEFAULT_LAYER);
        
        
        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addComponent(jLayeredPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 934, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 47, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLayeredPane2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jScrollPane1.setViewportView(jPanel1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        pack();

    }// </editor-fold>

    
    public void setBP(Mzuser bp){
    	this.bp = bp;
    	updateBP();
    }
    
    private void updateBP(){
    	if(bp != null){
    		jtfFixRecipient.setText(bp.getName().trim());
    		jtfFixRecipientAddress.setText(bp.getadress().trim());
    		jtfFixRecipientIin.setText(bp.getiin().trim());
    		jtfFixRecipientSerial.setText(bp.getserial().trim());
    		jtfFixRecipientSerialNo.setText(bp.getnSerial().trim());
    		jbBP.setBorder(borderDefault);
    	}else{
    		jtfFixRecipient.setText("");
    		jtfFixRecipientAddress.setText("");
    		jtfFixRecipientIin.setText("");
    		jtfFixRecipientSerial.setText("");
    		jtfFixRecipientSerialNo.setText("");
    		jbBP.setBorder(borderBlue);
    	}
    }
    
    private void jbBPActionPerformed(java.awt.event.ActionEvent evt) {
        new SearchBPartner(this).setVisible(true);
    }
    
    private void jcbMonthsActionPerformed(java.awt.event.ActionEvent evt) {
        if(jcbMonths.getSelectedIndex() != 12)
        	jcbMonths.setBorder(borderDefault);
        else	
        	jcbMonths.setBorder(borderBlue);
    }
    
    private void jbKeyActionPerformed(java.awt.event.ActionEvent evt) {
    	final JFileChooser fc = new JFileChooser();
    	fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
		if (JFileChooser.APPROVE_OPTION == fc.showOpenDialog(this)) {
			String file = fc.getSelectedFile().getAbsolutePath();
//			System.out.println(file);
			jTextField63.setText(file);
			jbKey.setBorder(borderDefault);
		}else{
			jTextField63.setText("");
			jbKey.setBorder(borderBlue);
		}
    }
    
    private void jbKey2ActionPerformed(java.awt.event.ActionEvent evt) {
    	final JFileChooser fc = new JFileChooser();
    	fc.setFileSelectionMode(JFileChooser.FILES_ONLY);
		if (JFileChooser.APPROVE_OPTION == fc.showOpenDialog(this)) {
			String file = fc.getSelectedFile().getAbsolutePath();
			jTextField64.setText(file);
			jbKey2.setBorder(borderDefault);
		}else{
			jTextField64.setText("");
			jbKey2.setBorder(borderBlue);
		}
    }

    private void jbCancelActionPerformed(java.awt.event.ActionEvent evt) {    
    	if(invoice != 0){
    		Mzinvoice zi = null;
    		zi = new Mzinvoice(ctx, invoice, null);
    		if(zi.getStatus().equals("SD")) 
    			if(user.get_ID() != zi.getzuser_ID()){
    				zi.setStatus("CA");
    				zi.saveEx();
    			}
    	}
    	dispose();
    }
    
    private void jbSaveActionPerformed(java.awt.event.ActionEvent evt) {                                         

    try{
    	if(!checkObligatoryFields()) return ;
    	//save
    	SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy");
    	Mzinvoice zi = null;
//    	docno
    	if(invoice == 0){
    		zi = new Mzinvoice(ctx, 0, null);
    		zi.setzuser_ID(user.get_ID());
    		zi.setdocno(Integer.parseInt(jtfDocNo.getText()));
    		
    	}
    	else{
    		zi = new Mzinvoice(ctx, invoice, null);
        }
    	
////    	dateacct
    	try{
    		String dd = jtfDay.getText() + ".";
    		dd += String.valueOf(jcbMonths.getSelectedIndex() + 1) + ".";
    		dd += jtfYear.getText();
    		
        	Date d = format.parse(dd);		//fix
    		Timestamp t = new Timestamp(d.getTime());
        	zi.setDateAcct(t);    		
    	}catch(Exception e){}
//    	
//    	//doctype
    	if(jcbFix.isSelected())	zi.setdoctype(true);
    	else zi.setdoctype(false);
//    	
//    	//fixDateAcct
//    	try{
//        	Date d = format.parse(jtfFixDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//        	zi.setfixdateacct(t);    		
//    	}catch(Exception e){}
//    	
//    	//fixno
//    	zi.setfixno(Integer.parseInt(jtfFixNo.getText()));
//    	
//    	//fixdocno
//    	zi.setfixdocno(Integer.parseInt(jtfFixDocNo.getText()));
//    	
//    	//fixdocdateacct
//    	try{
//        	Date d = format.parse(jtfFixDocDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//        	zi.setfixdocdateacct(t);    		
//    	}catch(Exception e){}    	
//    	
    	if(invoice == 0){
	    	zi.setzuser_ID(user.get_ID());
	    	//fixsupplier
	    	zi.setfixsupplier(jtfFixSupplier.getText());
	    	//fixsupplierstatus
	    	if(jrbSupplier1.isSelected())	zi.setfixsupplierstatus(new BigDecimal(1));	
	    	if(jrbSupplier2.isSelected())	zi.setfixsupplierstatus(new BigDecimal(2));
	    	if(jrbSupplier3.isSelected())	zi.setfixsupplierstatus(new BigDecimal(3));
	    	if(jrbSupplier4.isSelected())	zi.setfixsupplierstatus(new BigDecimal(4));
	    	if(jrbSupplier5.isSelected())	zi.setfixsupplierstatus(new BigDecimal(5));
	//    	zi.setfixsupplierstatus()
	    	zi.setfixsupplieriin(jtfFixSupplierIin.getText());
	    	//setfixsupplieraddress
	    	zi.setfixsupplieraddress(jtfFixSupplierAddress.getText() + jtfFixSupplierAddress2.getText());
	    	//setfixsupplierserial
	    	zi.setfixsupplierserial(jtfFixSupplierSerial.getText());
	    	//setfixsuppliererialno
	    	zi.setfixsuppliererialno(Integer.parseInt(jtfFixSupplierSerialNo.getText()));
    	}
//    	//setfixconract
//    	zi.setfixconract(jtfFixContract.getText());
//    	
//    	//setfixcontractdate
//    	try{
//        	Date d = format.parse(jtfFixContractDate.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//    		zi.setfixcontractdate(t);    		
//    	}catch(Exception e){}    	
//
//    	//setfixconditionpayment
//    	zi.setfixconditionpayment(jtfFixConditionPayment.getText() + jtfFixConditionPayment2.getText());
//    	
//    	//setfixpoint
//    	zi.setfixpoint(jtfFixPoint.getText());
//    	
//    	//shipper		 
//    	zi.setshipper(jtfShipper.getText());
//    	//shipperiin		
//    	zi.setshipperiin(jtfShipperIin.getText());
//    	//shipperaddress	
//    	zi.setshipperaddress(jtfShipperAddress.getText());
//    	//consignee	 
//    	zi.setconsignee(jtfConsignee.getText());
//    	//consigneeiin		 
//    	zi.setconsigneeiin(jtfConsigneeIin.getText());
//    	//consigneeaddress	 
//    	zi.setconsigneeaddress(jtfConsigneeAddress.getText());
//    	
//    	
    	if(invoice == 0){
	    	zi.setzuseridto(bp.get_ID());
	//    	// fixrecipient 
	    	zi.setfixrecipient(jtfFixRecipient.getText() + jtfFixRecipient2.getText());
	    	// fixrecipientstatus
	//    	zi.setfixrecipientstatus(new BigDecimal(jtfFixRecipient.getText()));
	    	// fixrecipientiin 
	    	zi.setfixrecipientiin(jtfFixRecipientIin.getText());
	    	// fixrecipientaddress 
	    	zi.setfixrecipientaddress(jtfFixRecipientAddress.getText());
	    	// fixresipientserial 
	    	zi.setfixrecipientserial(jtfFixRecipientSerial.getText());
	    	// fixrecipientserialno 
	    	zi.setfixrecipientserialno(Integer.parseInt(jtfFixRecipientSerialNo.getText()));
    	}
//    	
//    	//currencytype
//    	zi.setCurrencyType(jtfCurrencyType.getText());
//    	  
//    	zi.setdetails1(jtfDetail1.getText());
//    	zi.setdetails2(jtfDetail2.getText());
//    	zi.setdetails3(jtfDetail3.getText());
//
//    	zi.setoperator(jtfOperator.getText());
    	
    	if(invoice == 0 ){
    		zi.setStatus("SD");
    		zi.setsign1(jTextField63.getText());
    	}
    	
    	if(invoice > 0){
    		if(zi.getStatus().equals("SD")) //sd-ps (send-post)
    			if(user.get_ID() != zi.getzuser_ID()){
    				zi.setsign2(jTextField64.getText());
    				zi.setStatus("AP");
    			}

    		if(zi.getStatus().equals("AP")) //approved-complete 
    			if(user.get_ID() == zi.getzuser_ID()){
    				zi.setStatus("CO");
    				
    			}
    		
    		if(zi.getStatus().equals("CA")){
        		zi.setStatus("SD");
    		}
    		
    	}
    	
    	
    		zi.saveEx();
    		invoice = zi.get_ID();
    	
    		this.dispose();
    		
    	}catch(Exception e){
    		JOptionPane.showMessageDialog(this, e.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
    	}
    }//save                                        

    @SuppressWarnings("serial")
	class zException extends Exception{

		public zException(String string) {
			super(string);
		}
	}
    
    private boolean checkObligatoryFields(){
    	
    	    		
    	SimpleDateFormat format = new SimpleDateFormat("dd.MM.yyyy");
    	
    	//jtfDocNo-----------------------------------------------------------	
		try{
			if(jtfDocNo.getText().equals(""))
				throw new zException("Поле '№ Договора' не заполненно, необходимо ввести данные");
				
			Integer.parseInt(jtfDocNo.getText());
			jtfDocNo.setBorder(borderDefault);
			
		}catch(zException zE){
			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			jtfDocNo.setBorder(borderRed);
			return false;
		}catch(Exception e){
			JOptionPane.showMessageDialog(this, "В поле '№ Договора' необходимо ввести только цифры", "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			jtfDocNo.setBorder(borderRed);
			return false;
		}

//    	dateacct
		try{
			if(jtfDay.getText().equals(""))
				throw new zException("Поле 'День' не заполненно, необходимо ввести данные");
		}catch(zException zE){
			jtfDay.setBorder(borderRed);
			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			return false;
		}
		
		try{
			if((jcbMonths.getSelectedIndex() == 12))
				throw new zException("Поле 'Месяц' не выбранно, необходимо ввести данные");
		}catch(zException zE){
			jcbMonths.setBorder(borderRed);
			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			return false;
		}
		try{
			if(jtfYear.getText().equals(""))
				throw new zException("Поле 'Год' не заполненно, необходимо ввести данные");
		}catch(zException zE){
			jtfYear.setBorder(borderRed);
			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			return false;
		}		
//    	//fixDateAcct-----------------------------------------------
//    	try{
//        	Date d = format.parse(jtfFixDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//        	zi.setfixdateacct(t);    		
//    	}catch(Exception e){}
//		try{
//			if(jtfFixDateAcct.getText().equals(""))
//				throw new Exception("Поле 'Дата исправление, аннулирования' пусто, необходимо ввести Дату в формате '31.01.2013' к примеру. ");
//				
//        	Date d = format.parse(jtfFixDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//			
//    		jtfFixDateAcct.setBorder(borderDefault);
//			
//		}catch(ParseException pe){
//			JOptionPane.showMessageDialog(this, "В поле '№ Договора' необходимо ввести Дату в формате '31.01.2013' к примеру.", "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDateAcct.setBackground(Color.red);
//			return false;
//		}catch(Exception e){
//			JOptionPane.showMessageDialog(this, e.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDateAcct.setBackground(Color.red);
//			return false;
//		}		

//    	
		
//    	//fixno--------------------------------------------------
//    	zi.setfixno(Integer.parseInt(jtfFixNo.getText()));
//		try{
//			if(jtfFixNo.getText().equals(""))
//				throw new zException("Поле 'Порядковый номер исправления' пусто, необходимо ввести данные");
//				
//			Integer.parseInt(jtfFixNo.getText());
//			
//			jtfFixNo.setBorder(borderDefault);
//			
//		}catch(zException zE){
//			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixNo.setBackground(Color.red);
//			return false;
//		}catch(Exception e){
//			JOptionPane.showMessageDialog(this, "В поле 'Порядковый номер исправления' необходимо ввести только цифры", "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixNo.setBackground(Color.red);
//			return false;
//		}		
    	
//    	//fixdocno----------------------------------------------
//    	zi.setfixdocno(Integer.parseInt(jtfFixDocNo.getText()));
//		try{
//			if(jtfFixDocNo.getText().equals(""))
//				throw new zException("Поле 'Номер счета фактуры, в которой вносятся исправления' пусто, необходимо ввести данные");
//				
//			Integer.parseInt(jtfFixDocNo.getText());
//			
//			jtfFixDocNo.setBorder(borderDefault);
//			
//		}catch(zException zE){
//			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDocNo.setBackground(Color.red);
//			return false;
//		}catch(Exception e){
//			JOptionPane.showMessageDialog(this, "В поле 'Номер счета фактуры, в которой вносятся исправления' необходимо ввести только цифры", "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDocNo.setBackground(Color.red);
//			return false;
//		}		
//    	
//    	//fixdocdateacct
//    	try{
//        	Date d = format.parse(jtfFixDocDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//        	zi.setfixdocdateacct(t);    		
//    	}catch(Exception e){}    	
//		try{
//			if(jtfFixDocDateAcct.getText().equals(""))
//				throw new Exception("Поле 'Дата счета фактуры, в которой вносятся исправления' пусто, необходимо ввести Дату в формате '31.01.2013' к примеру. ");
//				
//        	Date d = format.parse(jtfFixDocDateAcct.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//			
//    		jtfFixDocDateAcct.setBorder(borderDefault);
//			
//		}catch(ParseException pe){
//			JOptionPane.showMessageDialog(this, "В поле 'Дата счета фактуры, в которой вносятся исправления' необходимо ввести Дату в формате '31.01.2013' к примеру.", "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDocDateAcct.setBackground(Color.red);
//			return false;
//		}catch(Exception e){
//			JOptionPane.showMessageDialog(this, e.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfFixDocDateAcct.setBackground(Color.red);
//			return false;
//		}		
    	
		
		
//    	//fixsupplier
//    	zi.setfixsupplier(jtfShipper.getText());
//		try{
//			if(jtfShipper.getText().equals(""))
//				throw new zException("Поле 'Поставщик/продавец' пусто, необходимо ввести данные");
//			
//			jtfShipper.setBorder(borderDefault);
//			
//		}catch(zException zE){
//			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jtfShipper.setBackground(Color.red);
//			return false;
//		}
//    	
//    	//fixsupplierstatus
//		try{
//			
//	    	if(
//	    		jrbSupplier1.isSelected() 	|| 	
//		    	jrbSupplier2.isSelected()	||
//		    	jrbSupplier3.isSelected()	||
//		    	jrbSupplier4.isSelected()	||
//		    	jrbSupplier5.isSelected()	
//   			);
//	    	else
//				throw new zException("Поле 'Статус поставщика' не отмеченно, необходимо выбрать 1 пункт");
//			
//	    	jrbSupplier1.setBorder(borderDefault);
//			
//		}catch(zException zE){
//			JOptionPane.showMessageDialog(this, zE.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			jrbSupplier1.setBackground(Color.red);
//			return false;
//		}
		
//    	//setfixconract
//    	zi.setfixconract(jtfFixContract.getText());
//    	
//    	//setfixcontractdate
//    	try{
//        	Date d = format.parse(jtfFixContractDate.getText());
//    		Timestamp t = new Timestamp(d.getTime());
//    		zi.setfixcontractdate(t);    		
//    	}catch(Exception e){}    	
//
//    	//setfixconditionpayment
//    	zi.setfixconditionpayment(jtfFixConditionPayment.getText() + jtfFixConditionPayment2.getText());
//    	
//    	//setfixpoint
//    	zi.setfixpoint(jtfFixPoint.getText());
//    	
//    	//shipper		 
//    	zi.setshipper(jtfShipper.getText());
//    	//shipperiin		
//    	zi.setshipperiin(jtfShipperIin.getText());
//    	//shipperaddress	
//    	zi.setshipperaddress(jtfShipperAddress.getText());
//    	//consignee	 
//    	zi.setconsignee(jtfConsignee.getText());
//    	//consigneeiin		 
//    	zi.setconsigneeiin(jtfConsigneeIin.getText());
//    	//consigneeaddress	 
//    	zi.setconsigneeaddress(jtfConsigneeAddress.getText());
//    	

		try{
			if(bp == null && jtfFixRecipient.getText().equals(""))
				throw new zException("Поле 'Получатель/покупатель' не выбранно, необходимо выбрать 'Получателя/покупателя'");
			
		}catch(zException e){
			JOptionPane.showMessageDialog(this, e.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
			return false;
		}
		
//		try{
//			if(invoice == 0){
//				if(jTextField63.getText().equals(""))
//					throw new zException("Отсутствует цифровая подпись, необходимо поставить цифровую подпись");
//			}else{
//				
////				if(jTextField64.getText().equals(""))
////					throw new zException("Отсутствует цифровая подпись, необходимо поставить цифровую подпись");
//				
//				if(jTextField63.getText().equals(""))
//					throw new zException("Отсутствует цифровая подпись, необходимо поставить цифровую подпись");
//			}
//			
//		}catch(zException e){
//			JOptionPane.showMessageDialog(this, e.getMessage(), "Проверка ввода", JOptionPane.ERROR_MESSAGE, null);
//			return false;
//		}
		
//    	// fixrecipient 
//    	zi.setfixrecipient(jtfFixRecipient.getText() + jtfFixRecipient2.getText());
//    	// fixrecipientstatus
////    	zi.setfixrecipientstatus(new BigDecimal(jtfFixRecipient.getText()));
//    	// fixrecipientiin 
//    	zi.setfixrecipientiin(jtfFixRecipientIin.getText());
//    	// fixrecipientaddress 
//    	zi.setfixrecipientaddress(jtfFixRecipientAddress.getText());
//    	// fixresipientserial 
//    	zi.setfixrecipientserial(jtfFixRecipientSerial.getText());
//    	// fixrecipientserialno 
//    	zi.setfixrecipientserialno(Integer.parseInt(jtfFixRecipientSerialNo.getText()));
//    	
//    	//currencytype
//    	zi.setCurrencyType(jtfCurrencyType.getText());
//    	  
//    	zi.setdetails1(jtfDetail1.getText());
//    	zi.setdetails2(jtfDetail2.getText());
//    	zi.setdetails3(jtfDetail3.getText());
//
//    	zi.setoperator(jtfOperator.getText());

    	return true;
    }
    
//    private void jtfDocNoActionPerformed(java.awt.event.ActionEvent evt) {
//        // TODO add your handling code here:
//    }


    
private void initJtable(){
               jTable2.setModel(new MyTableModel());
};

private void  initJtree(){
//               jTree1.setModel(new DefaultTreeModel(getJtreeModel())); 
}

////class myJTreeModel() extends DefaultTreeModel{
////    
////}
//
//private DefaultMutableTreeNode getJtreeModel(){
//    DefaultMutableTreeNode model = new DefaultMutableTreeNode("root");
//        DefaultMutableTreeNode nodeIn =new DefaultMutableTreeNode("Входящие");
//        model.add(nodeIn);
//            DefaultMutableTreeNode nodeGr1 =new DefaultMutableTreeNode("Группа1");
//            nodeIn.add(nodeGr1);
//                                DefaultMutableTreeNode nodeBp1 =new DefaultMutableTreeNode("Бизнес-парнер1");
//                                nodeGr1.add(nodeBp1);
//                                                                    DefaultMutableTreeNode node2011 =new DefaultMutableTreeNode("2011");
//                                                                    nodeBp1.add(node2011);
//                                                                    DefaultMutableTreeNode node2012 =new DefaultMutableTreeNode("2012");
//                                                                    nodeBp1.add(node2012);
//                                                                            DefaultMutableTreeNode nodeInvoice1 =new DefaultMutableTreeNode("Счет-фактура 1");
////                                                                            node2012.
//                                                                            node2012.add(nodeInvoice1);
//                                                                            DefaultMutableTreeNode nodeInvoice2 =new DefaultMutableTreeNode("Счет-фактура 2");
//                                                                            node2012.add(nodeInvoice2);                                                                    
//
//                                DefaultMutableTreeNode nodeBp2 =new DefaultMutableTreeNode("Бизнес-парнер2");
//                                nodeGr1.add(nodeBp1);
//                                DefaultMutableTreeNode nodeBp3 =new DefaultMutableTreeNode("Бизнес-парнер3");
//                                nodeGr1.add(nodeBp1);              
//                                
//            DefaultMutableTreeNode nodeGr2 =new DefaultMutableTreeNode("Группа1");
//            nodeIn.add(nodeGr2);
//            DefaultMutableTreeNode nodeGr3 =new DefaultMutableTreeNode("Группа1");
//            nodeIn.add(nodeGr2);
//            
//        
//        
//        DefaultMutableTreeNode nodeOut =new DefaultMutableTreeNode("Исходящие");
//        model.add(nodeOut);
//            nodeOut.add(nodeGr2);
//            nodeOut.add(nodeGr3);
//    return model;        
//}


class MyTableModel extends AbstractTableModel {
    String[] columnNames = {
                        "№ п/п",
                        "Наименование товаров (работ, услуг)",
                        "Код товара",
                        "Дата совершения оборота по реализации",
                        "Ед. измерения",
                        "Кол-во (объем)",
                        "Цена (тариф) за еденицу товара, работы, услуги без учета НДС",
                        "Стоимость товаров, работ, услуг без НДС",
                        "Акциз/ставка",
                        "Акциз/сумма",
                        "НДС/ставка",
                        "НДС/Сумма",
                        "Стоимость товаров, работ, услуг с учетом НДС",
                        "Размер оборота по реализации"
                       };
    
    Object[][] data = {
                    {   new Integer(1), 
                        "Компьютер", 
                        new Integer(1234546), 
                        "01.12.2012", 
                        "шт.", 
                        new Double("1"), 
                        new Double("100000.00"), 
                        new Double("100000.00"),
                        new Double("00.00"),
                        new Double("00.00"),
                        new Double("12.00"),
                        new Double("12.00"),
                        new Double("112000.00"),
                        new Double("112000.00")
                    },
                    {   new Integer(1), 
                        "Принтер", 
                        new Integer(1234546), 
                        "01.12.2012", 
                        "шт.", 
                        new Double("1"), 
                        new Double("50000.00"), 
                        new Double("50000.00"),
                        new Double("00.00"),
                        new Double("00.00"),
                        new Double("12.00"),
                        new Double("12.00"),
                        new Double("55000.00"),
                        new Double("55000.00")
                    }    
    };

    public int getColumnCount() {
        return columnNames.length;
    }

    public int getRowCount() {
        return data.length;
    }

    public String getColumnName(int col) {
        return columnNames[col];
    }

    public Object getValueAt(int row, int col) {
        return data[row][col];
    }

    public Class getColumnClass(int c) {
        return getValueAt(0, c).getClass();
    }

    /*
     * Don't need to implement this method unless your table's
     * editable.
     */
    public boolean isCellEditable(int row, int col) {
        //Note that the data/cell address is constant,
        //no matter where the cell appears onscreen.
        if (col < 2) {
            return false;
        } else {
            return true;
        }
    }

    /*
     * Don't need to implement this method unless your table's
     * data can change.
     */
    public void setValueAt(Object value, int row, int col) {
//        data[row][col] = value;
//        fireTableCellUpdated(row, col);
    }
    
}    
    

private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.ButtonGroup buttonGroup2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel100;
private javax.swing.JLabel jLabel101;
private javax.swing.JLabel jLabel102;
private javax.swing.JLabel jLabel103;
private javax.swing.JLabel jLabel106;
private javax.swing.JLabel jLabel107;
private javax.swing.JLabel jLabel108;
private javax.swing.JLabel jLabel110;
private javax.swing.JLabel jLabel111;
private javax.swing.JLabel jLabel113;
private javax.swing.JLabel jLabel114;
private javax.swing.JLabel jLabel115;
private javax.swing.JLabel jLabel116;
private javax.swing.JLabel jLabel118;
private javax.swing.JLabel jLabel120;
private javax.swing.JLabel jLabel121;
private javax.swing.JLabel jLabel123;
private javax.swing.JLabel jLabel124;
private javax.swing.JLabel jLabel126;
private javax.swing.JLabel jLabel128;
private javax.swing.JLabel jLabel129;
private javax.swing.JLabel jLabel130;
private javax.swing.JLabel jLabel131;
private javax.swing.JLabel jLabel132;
private javax.swing.JLabel jLabel133;
private javax.swing.JLabel jLabel134;
private javax.swing.JLabel jLabel135;
private javax.swing.JLabel jLabel138;
private javax.swing.JLabel jLabel139;
private javax.swing.JLabel jLabel140;
private javax.swing.JLabel jLabel142;
private javax.swing.JLabel jLabel143;
private javax.swing.JLabel jLabel144;
private javax.swing.JLabel jLabel145;
private javax.swing.JLabel jLabel146;
private javax.swing.JLabel jLabel147;
private javax.swing.JLabel jLabel148;
private javax.swing.JLabel jLabel149;
private javax.swing.JLabel jLabel151;
private javax.swing.JLabel jLabel152;
private javax.swing.JLabel jLabel153;
private javax.swing.JLabel jLabel154;
private javax.swing.JLabel jLabel155;
private javax.swing.JLabel jLabel156;
private javax.swing.JLabel jLabel157;
private javax.swing.JLabel jLabel158;
private javax.swing.JLabel jLabel159;
private javax.swing.JLabel jLabel160;
private javax.swing.JLabel jLabel161;
private javax.swing.JLabel jLabel162;
private javax.swing.JLabel jLabel163;
private javax.swing.JLabel jLabel164;
private javax.swing.JLabel jLabel165;
private javax.swing.JLabel jLabel166;
private javax.swing.JLabel jLabel167;
private javax.swing.JLabel jLabel168;
private javax.swing.JLabel jLabel169;
private javax.swing.JLabel jLabel170;
private javax.swing.JLabel jLabel171;
private javax.swing.JLabel jLabel172;
private javax.swing.JLabel jLabel173;
private javax.swing.JLabel jLabel174;
private javax.swing.JLabel jLabel175;
private javax.swing.JLabel jLabel176;
private javax.swing.JLabel jLabel177;
private javax.swing.JLabel jLabel178;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel88;
private javax.swing.JLabel jLabel90;
private javax.swing.JLabel jLabel91;
private javax.swing.JLabel jLabel92;
private javax.swing.JLabel jLabel93;
private javax.swing.JLabel jLabel94;
private javax.swing.JLabel jLabel95;
private javax.swing.JLabel jLabel97;
private javax.swing.JLabel jLabel98;
private javax.swing.JLabel jLabel99;
private javax.swing.JLayeredPane jLayeredPane2;
private javax.swing.JPanel jPanel1;
private javax.swing.JPanel jPanel10;
private javax.swing.JPanel jPanel16;
private javax.swing.JPanel jPanel17;
private javax.swing.JPanel jPanel18;
private javax.swing.JPanel jPanel19;
private javax.swing.JPanel jPanel20;
private javax.swing.JPanel jPanel21;
private javax.swing.JPanel jPanel22;
private javax.swing.JPanel jPanel23;
private javax.swing.JPanel jPanel25;
private javax.swing.JPanel jPanel26;
private javax.swing.JPanel jPanel27;
private javax.swing.JPanel jPanel28;
private javax.swing.JPanel jPanel29;
private javax.swing.JPanel jPanel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JPanel jPanel5;
private javax.swing.JPanel jPanel6;
private javax.swing.JPanel jPanel7;
private javax.swing.JPanel jPanel8;
private javax.swing.JPanel jPanel9;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JScrollPane jScrollPane3;
private javax.swing.JTable jTable2;
private javax.swing.JTextField jTextField11;
private javax.swing.JTextField jTextField12;
private javax.swing.JTextField jTextField14;
private javax.swing.JTextField jTextField18;
private javax.swing.JTextField jTextField19;
private javax.swing.JTextField jTextField20;
private javax.swing.JTextField jTextField21;
private javax.swing.JTextField jTextField22;
private javax.swing.JTextField jTextField31;
private javax.swing.JTextField jTextField32;
private javax.swing.JTextField jTextField33;
private javax.swing.JTextField jTextField34;
private javax.swing.JTextField jTextField35;
private javax.swing.JTextField jTextField48;
private javax.swing.JTextField jTextField49;
private javax.swing.JTextField jTextField51;
private javax.swing.JTextField jTextField52;
private javax.swing.JTextField jTextField53;
private javax.swing.JTextField jTextField54;
private javax.swing.JTextField jTextField55;
private javax.swing.JTextField jTextField56;
private javax.swing.JTextField jTextField57;
private javax.swing.JTextField jTextField58;
private javax.swing.JTextField jTextField59;
private javax.swing.JTextField jTextField60;
private javax.swing.JTextField jTextField61;
private javax.swing.JTextField jTextField63;
private javax.swing.JTextField jTextField64;
private javax.swing.JButton jbCancel;
private javax.swing.JButton jbSave;
private javax.swing.JCheckBox jcbExt;
private javax.swing.JCheckBox jcbFix;
private javax.swing.JComboBox jcbMonths;
private javax.swing.JRadioButton jrbFixRecipient1;
private javax.swing.JRadioButton jrbFixRecipient2;
private javax.swing.JRadioButton jrbFixRecipient3;
private javax.swing.JRadioButton jrbFixRecipient4;
private javax.swing.JRadioButton jrbFixRecipient5;
private javax.swing.JRadioButton jrbSupplier1;
private javax.swing.JRadioButton jrbSupplier2;
private javax.swing.JRadioButton jrbSupplier3;
private javax.swing.JRadioButton jrbSupplier4;
private javax.swing.JRadioButton jrbSupplier5;
private javax.swing.JTextField jtfConsignee;
private javax.swing.JTextField jtfConsigneeAddress;
private javax.swing.JTextField jtfConsigneeIin;
private javax.swing.JTextField jtfCurrencyType;
private javax.swing.JTextField jtfDateRecient;
private javax.swing.JTextField jtfDateSend;
private javax.swing.JTextField jtfDay;
private javax.swing.JTextField jtfDetail1;
private javax.swing.JTextField jtfDetail2;
private javax.swing.JTextField jtfDetail3;
private javax.swing.JTextField jtfDocNo;
private javax.swing.JTextField jtfFixConditionPayment;
private javax.swing.JTextField jtfFixConditionPayment2;
private javax.swing.JTextField jtfFixContract;
private javax.swing.JTextField jtfFixContractDate;
private javax.swing.JTextField jtfFixDateAcct;
private javax.swing.JTextField jtfFixDocDateAcct;
private javax.swing.JTextField jtfFixDocNo;
private javax.swing.JTextField jtfFixNo;
private javax.swing.JTextField jtfFixPoint;
private javax.swing.JTextField jtfFixRecipient;
private javax.swing.JTextField jtfFixRecipient2;
private javax.swing.JTextField jtfFixRecipientAddress;
private javax.swing.JTextField jtfFixRecipientAddress2;
private javax.swing.JTextField jtfFixRecipientIin;
private javax.swing.JTextField jtfFixRecipientSerial;
private javax.swing.JTextField jtfFixRecipientSerialNo;
private javax.swing.JTextField jtfFixSupplier;
private javax.swing.JTextField jtfFixSupplierAddress;
private javax.swing.JTextField jtfFixSupplierAddress2;
private javax.swing.JTextField jtfFixSupplierIin;
private javax.swing.JTextField jtfFixSupplierSerial;
private javax.swing.JTextField jtfFixSupplierSerialNo;
private javax.swing.JTextField jtfOperator;
private javax.swing.JTextField jtfShipper;
private javax.swing.JTextField jtfShipperAddress;
private javax.swing.JTextField jtfShipperIin;
private javax.swing.JTextField jtfYear;
private javax.swing.JButton jbKey;
private javax.swing.JButton jbKey2;
private javax.swing.JButton jbBP;
 
}
